package com.xiaochong.tir.manager.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xiaochong.tir.common.data.mapper.SyRotationMapMapper;
import com.xiaochong.tir.common.data.po.SyRotationMap;

@Service
public class SyRotationMapService {
	@Autowired
	private SyRotationMapMapper syRotationMapMapper;

	public PageInfo<SyRotationMap> findList(SyRotationMap syRotationMap, int page, int limit) {
		PageHelper.startPage(page, limit);
		return new PageInfo<SyRotationMap>(syRotationMapMapper.findList(syRotationMap));
	}
	
	public int saveSyRotationMap(SyRotationMap syRotationMap){
		return syRotationMapMapper.insertSelective(syRotationMap);
	}
	
	public int updateSyRotationMap(SyRotationMap syRotationMap){
		return syRotationMapMapper.updateByPrimaryKey(syRotationMap);
	}
	
	public SyRotationMap getSyRotationMap(Integer id){
		return syRotationMapMapper.selectByPrimaryKey(id);
	}
	
}
